package com.tl.khadmin.mapper;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.tl.khadmin.bean.Product;
import com.tl.khadmin.bean.dto.ProductDetailDto;
import com.tl.khadmin.bean.dto.ProductListDto;
import com.tl.khadmin.bean.dto.ProductSelectListDto;

public interface ProductMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Product record);

    int insertSelective(ProductDetailDto record);

    Product selectByPrimaryKey(Integer id);

    Product selectByCode(@Param("code") String code);

    Product selectByBarCode(@Param("barcode") String barcode);

    int updateByPrimaryKeySelective(Product record);

    int updateByPrimaryKeyWithBLOBs(Product record);

    int updateByPrimaryKey(Product record);

	List<ProductListDto> showProductByPage(Map<String, Object> params);

	List<ProductSelectListDto> listProductSelect(Map<String, Object> param);

	ProductDetailDto queryProductDetail(Integer id);

	int updateCode(@Param("id")Integer id, @Param("code") String code);

	int deleteProductByIds(@Param("ids") String[] ids);

	int countByBarCode(@Param("code") String code);
}